/*
 * @Author: lijing
 * @e-mail: 1413979079@qq.com
 * @LastEditors: lijing
 * @Date: 2020-05-04 12:09:29
 * @LastEditTime: 2020-06-20 21:47:25
 * @FilePath: \client\src\model\Comment.ts
 * @Description: comment class
 */

export default class Comment {
  public id: number;
  public createdAt: string;
  public comName: string;
  public comId: number;
  public parentId: number;
  public content: string;
  public static create(com: any): Comment {
    const comment = new Comment();
    comment.id = com.id;
    comment.createdAt = com.created_at;
    comment.comName = com.com_name;
    comment.comId = com.com_id;
    comment.parentId = com.parent_id;
    comment.content = com.content;
    return comment;
  }
}
